package iss.anxios.service;

import iss.anxios.dao.RespondentDao;
import iss.anxios.dto.Respondent;
import iss.anxios.dto.RespondentAttributeAssociation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("respondentservice")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class RespondentServiceImpl implements RespondentService {

	@Autowired
	private RespondentDao respondentdao;
	
	@Override
	public List<Respondent> ListRespondent() {
		return respondentdao.ListRespondent();
	}

	@Override
	public List<RespondentAttributeAssociation> ListRespondentAttributeAssociation() {
		System.out.println("I am in the servie  now");
		
		//List<RespondentAttributeAssociation> list = respondentdao.ListRespondentAttributeAssociation();
		//System.out.println("in service"+" list size is "+list.size());
		
		return respondentdao.ListRespondentAttributeAssociation();
	}

}
